cmake_minimum_required(VERSION 3.10)
project(range_examples)

if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
    add_compile_options(-std=c++20)
  else()
    add_compile_options(-std=c++17 -fconcepts)
  endif()
elseif(MSVC)
  add_compile_options(/std:c++latest /permissive-)
else()
  message(FATAL_ERROR "Unrecognized compiler")
endif()

include_directories(../3rd-party/cmcstl2/include)
include_directories(../3rd-party/nvwa)

add_executable(rg_test01_sort               test01_sort.cpp)
add_executable(rg_test02_reverse_view       test02_reverse_view.cpp)
add_executable(rg_test03_filter_view        test03_filter_view.cpp)
add_executable(rg_test04_filter_reverse     test04_filter_reverse.cpp)
add_executable(rg_test05_null_sentinel      test05_null_sentinel.cpp)
add_executable(rg_test06_squared_sum        test06_squared_sum.cpp)
#add_executable(rg_test07_ranges_begin       test07_ranges_begin.cpp)
#add_executable(rg_test08_ranges_v3_zip_sort test08_ranges_v3_zip_sort.cpp)
